﻿//​有如下三个类的定义：
#include <iostream>

using namespace std;
class Base1 {
	int id;
public:
	Base1(int id) :id(id) {
		cout << "Base1 Constructed,ID:" << id << endl;
	}
	~Base1() {
		cout << "Base1 Destructed,ID:" << id << endl;
	}
};

class Base2 {
	int id;
public:
	Base2(int id) :id(id) {
		cout << "Base2 Constructed,ID:" << id << endl;
	}
	~Base2() {
		cout << "Base2 Destructed,ID:" << id << endl;
	}
};

class Base3 {
	int id;
public:
	Base3(int id) :id(id) {
		cout << "Base3 Constructed,ID:" << id << endl;
	}
	~Base3() {
		cout << "Base3 Destructed,ID:" << id << endl;
	}
};
class Derived : public Base3,public Base1, public Base2
{
	Base2 b2;
	Base1 b1;
	Base3 b3;
	int n1;
public:
	Derived(int id1, int id2, int id3, int id4, int id5, int id6, int id7):Base3(id6), Base1(id4), Base2(id5),b2(id2),b1(id1),b3(id3)
	{
		n1 = id7;
		cout << "Derived Constructed,ID:" << n1 << endl;

	}
	~Derived() {
		cout << "Derived Destructed,ID:" << n1 << endl;
	}
};
//现在要在这三个类的基础上，定义派生类Derived。
//
//请根据main函数的内容，结合输入输出，给出Derived类的完整定义。

int main() {
	int id1, id2, id3, id4, id5, id6, id7;
	cin >> id1 >> id2 >> id3 >> id4 >> id5 >> id6 >> id7;
	Derived d(id1, id2, id3, id4, id5, id6, id7);
	return 0;
}